package cn.edu.seu.ssny.dao;

import cn.edu.seu.ssny.dao.support.IBaseDao;
import cn.edu.seu.ssny.entity.SysClass;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import javax.xml.ws.Action;
import java.util.List;

@Repository
public interface ISysClassDao extends IBaseDao<SysClass, Long> {

    @Query(value = "select * from tb_sysclass where project_id=?1", nativeQuery = true)
    List<SysClass> findAllByProjectId(Long projectId);

    @Query(value = "select * from tb_sysclass where project_id=?1 and class_name=?2", nativeQuery = true)
    SysClass findByProjectIdAndClassName(Long projectId, String className);
}
